Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

TP2000-1644 Strengthen Content Security Policy configuration #1393

Open
wants to merge 6 commits into
base: master
Choose a base branch
from

Conversation

dalecannon
Copy link
Contributor

@dalecannon dalecannon commented Jan 23, 2025

TP2000-1644 Strengthen Content Security Policy configuration

Why

Recommendations have been made to improve the Content Security Policy (CSP) header.

What

  • Bumps the version of django-csp to 3.8 which adds support for Trusted Types
  • Adds object-src, base-uri, strict-dynamic and trusted-types directives to the CSP header
  • Creates a default Trusted Types policy that acts as a fallback for third-party libraries that don't adhere to Trusted Types (e.g accessible-autocomplete)
  • Adds dompurify JS package for use in default Trusted Types policy
  • Enables webpack.js Trusted Types support
  • Bumps the version of django-debug-toolbar to 5.0.1 for compatibility with the newly added 'strict-dynamic' CSP directive

Checklist

  • Requires migrations?
  • Requires dependency updates? Yes

Links to relevant material

@dalecannon dalecannon requested a review from a team as a code owner January 23, 2025 16:22
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant